
import java.math.BigInteger;

public class Test {
    public static void main(String[] args) {
        long sTime = System.currentTimeMillis();
	BigInteger n = factorial(100);
        String l = String.valueOf(n);
        int sum = 0;
        for (int i = 0; i < l.length(); i++) {
            int j = Integer.parseInt(String.valueOf(l.charAt(i)));
            sum += j;
        }
        System.out.println(sum);
        long fTime = System.currentTimeMillis();
        System.out.println("Time: " + (fTime - sTime) + "ms");
    }

    static BigInteger factorial(int n) {
        BigInteger result = new BigInteger(String.valueOf(n));
        for (int i = n; i > 0; i--) {
            result = result.multiply(new BigInteger(String.valueOf(i)));
        }
        return result;
    }
}